<?php
if (!defined('IN_MEDIA_ADMIN')) die("Hacking attempt");
$menu_arr = array(
	'info'	=>	array(
		'Quản lí cá nhân',
		array(
			'info'          =>	array('Thông tin cá nhân','act=edit_info'),
			'passemail'	=>	array('Password & Email','act=edit_pass_email'),
			'upload'	=>	array('Đăng Nhạc','act=upload'),
			'list_upload'	=>	array('Danh sách nhạc đã Đăng','act=list_upload'),
                        'friends_list'     =>      array('Danh sách bạn bè','act=friends_list'),
                    ),
	)
);
if ($level == 2) {

	unset($menu_arr['config']);
	foreach ($menu_arr as $key => $v) {
		if (!$mod_permission['add_'.$key]) unset($menu_arr[$key][1]['add']);
		if (!$mod_permission['edit_'.$key]) unset($menu_arr[$key][1]['edit']);
		
		if ($key == 'media' && !$mod_permission['edit_'.$key]) unset($menu_arr[$key][1]['edit_broken']);
		if ($key == 'media' && !$mod_permission['add_'.$key]) unset($menu_arr[$key][1]['add_multi']);
		
		if (!$menu_arr[$key][1]) unset($menu_arr[$key]);
	}
}
echo "<div><a href='index.php'><b>Trang chủ</b></a> || <a href='User/Logout.html'><b>Thoát</b></a></div>";
foreach ($menu_arr as $key => $arr) {
	echo "<table cellpadding=2 cellspacing=0 width=100% class=border style='margin-bottom:5'>";
	echo "<tr><td class=title><b>".$arr[0]."</b></td></tr>";
	foreach ($arr[1] as $m_key => $m_val) {
		echo "<tr><td><a href=\"memcp.php?id=".$_SESSION['identifier']."&".$m_val[1]."\">".$m_val[0]."</a></td></tr>";
	}
	echo "</table>";
}
?>